package com.samuel.conntroller;


import com.samuel.domain.User;
import com.samuel.repository.UserRePository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @date:2017/11/27
 * @time: 19:30
 * @author:zhaoyang
 * @desc:
 **/
@RestController
public class UserController {


    @Autowired
    private UserRePository userRePository;

    @RequestMapping("/web/mvc/user/save")
    public  Boolean save(@RequestBody User user){
           return userRePository.save(user);
    }

}
